
/*
 * Copyright (C) 2008-2009 Archie L. Cobbs. All rights reserved.
 *
 * $Id: SetFieldModel.java 295 2010-01-13 21:03:17Z archie.cobbs $
 */

package org.dellroad.sidekar.schema.model;

/**
 * Schema type representing set types.
 *
 * @see org.dellroad.sidekar.SetField
 */
public class SetFieldModel extends CollectionFieldModel {

    public static final String NAME = "set";

    // Normal constructor
    public SetFieldModel() {
        super(NAME);
    }

    // Copy constructor
    SetFieldModel(SetFieldModel original, SchemaModel schemaModel) {
        super(original, schemaModel);
    }

    @Override
    public <R> R visit(FieldModelSwitch<R> sw) {
        return sw.caseSetFieldModel(this);
    }

    @Override
    public final String getTypeDescription() {
        return "set of " + this.getElementModel().getTypeDescription();
    }
}

